package com.hex.ds.hdtp.core.inf.common.exception;

import com.hex.ds.hdtp.core.inf.common.enums.SourceJdbcErrorCode;

/**
 * @Description: 系统异常类
 * @Package: com.hex.ds.source.common.exception
 * @ClassName: SourceSystemSecurityCertificationException
 *
 * @Author: xiaoma
 * @Date: 2022/1/13 11:28
 * @Version: v1.0
 **/
public class SourceSystemException extends RuntimeException{

    private String code;
    private String errMsg;

    /**
     * @Description: 系统自定义异常
     * @Method: SourceSystemSecurityCertificationKerberosException
     * @Param: message 1
     * @Return:
     *
     * @Author: xiaoma
     * @Date: 2022/1/13 11:20
     * @Version: V1.0
     */
    public SourceSystemException(String message) {
        super(message);
    }

    /**
     * @Description: 系统自定义异常
     * @Method: SourceSystemSecurityCertificationException
     * @Param: message 1
     * @Param: e 2
     * @Return:
     *
     * @Author: xiaoma
     * @Date: 2022/1/13 11:28
     * @Version: V1.0
     */
    public SourceSystemException(String message, Exception e) {
        super(message, e);
    }

    public SourceSystemException(SourceJdbcErrorCode errorCode, Exception e) {
        this.code = errorCode.getCode();
        this.errMsg = errorCode.getMessage();
    }
}
